package com.langyue.lintcode.main;

import com.langyue.lintcode.entity.User;

public class TestMain {
    public static void main(String[] args) {
        long beginTime = System.currentTimeMillis();
        for (int i = 0; i < 1000000; i++){
            User user = new User();
            user.setUsername("eeee"+i);
        }
        long endTime = System.currentTimeMillis();
        System.out.println(endTime - beginTime);

        long beginTime2 = System.currentTimeMillis();
        for (int i = 0; i < 1000000; i++){
            User user1 = User.getInstance();
            user1.setUsername("rr"+i);
        }
        long endTime2 = System.currentTimeMillis();
        System.out.println(endTime2 - beginTime2);
    }
}
